<?php

namespace app\common\model;

use think\Model;

class Contact extends Model
{

    /**
     * 新增联系我们
     */
    static function add_contact($param)
    {
        $param['message'] = strip_tags($param['message']);
        $s = new self();
        $s->user_id = isset($param['user_id']) ? $param['user_id'] : '';
        $s->community_id = isset($param['community_id']) ? $param['community_id'] : '';
        $s->title = isset($param['title']) ? $param['title'] : '';
        $s->message = isset($param['message']) ? $param['message'] : '';
        $s->created_time = date("Y-m-d H:i", time());
        $s->save();
        return $s;
    }

}
